﻿#ifndef OPDB_H
#define OPDB_H
#pragma once
#include <QObject>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include "mypdu.h"
#include <QList>
#include <QDebug>
#include <QString>

class OpDb : public QObject
{
    Q_OBJECT
public:
    explicit OpDb(QObject *parent = nullptr);
    ~OpDb();
    static OpDb& getInstance();
    void  connectDB();
    QList<QString>  getUserInfo(QString uname);
    bool saveUserInfo(QList<QString> info);
    QString getNickName(QString uname);
    QString getHeadPath(QString id);
    QString getID(QString nickname);
    QString getGroupNotify(QString gid);
    void updateHead(QString id,QString path);
signals:

private:
    QSqlDatabase m_db;
};
#endif // OPDB_H
